home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls074c.sunsparc.Z / tls074c.sunsparc / lib / vtcl / tests / object.tcl < prev    next >
Encoding:
Text File  |  1995-07-20  |  1016 b   |  48 lines

  1. # CVS $Id: object.tcl,v 1.3 1995/02/03 16:55:04 zibi Exp $
  2. #
  3. # Script to test the various options of the object class
  4. #
  5.  
  6. source tools.tcl
  7.  
  8. proc shortCB  {target cbs} {
  9.  
  10.     set str [keylget cbs helpString]
  11.  
  12.     VtSetValues $target -label $str
  13. }
  14.  
  15. proc createObjects {parent shortLabel} {
  16.      VtPushButton $parent.but -label but1 -shortHelpString "but 1" \
  17.      -shortHelpCallback "shortCB $shortLabel"
  18.      
  19.  
  20.      VtPushButton $parent.but2 -label "Button 1" \
  21.      -shortHelpString "but 2"\
  22.      -shortHelpCallback "shortCB $shortLabel"
  23.  
  24.      VtPushButton $parent.exit -label Exit -borderWidth 1 -callback QuitCB 
  25.  
  26. }
  27.  
  28. set ap [VtOpen ObjectTest]
  29.  
  30. set dlog [VtFormDialog $ap.dlog ]
  31.  
  32. set rc [VtRowColumn $dlog.rc -leftSide FORM -rightSide FORM]
  33.  
  34. set sep [VtSeparator $dlog.sep -below $rc -leftSide FORM -rightSide FORM]
  35.  
  36. VtPushButton $rc.but44 
  37.  
  38. set shortLabel [VtLabel $dlog.shortLab \
  39.         -topSide $rc -bottomSide FORM -leftSide FORM -rightSide FORM\
  40.         -bottomOffset 2]
  41.  
  42. createObjects $rc $shortLabel
  43.  
  44. VtShow $dlog
  45.  
  46. VtMainLoop
  47.  
  48.